#include<bits/stdc++.h>
using namespace std;
struct Fraction {
	int numerator;
	int denominator;
};

void print(const Fraction &f) {
	printf("%d/%d", f.numerator, f.denominator);
}
void rationalize(Fraction &f) {
	int g = __gcd(f.numerator, f.denominator);
	f.denominator /= g;
	f.numerator /= g;
}
void input(Fraction &f) {
	scanf("%d%d", &f.numerator, &f.denominator);
	rationalize(f);
}

int main() {
	Fraction f ;

	input(f);

	print(f);

}
